import axios from 'axios'

export default class DeviceReparService {
    static deviceReparService = null

    static getInstance(){
        if(this.deviceReparService == null){
            this.deviceReparService = new DeviceReparService()
        }
        return this.deviceReparService
    }

    //添加
    save(params){
        return axios.post(`http://localhost/deviceRepairs`,params)
    }

    list(params){
        console.log('维修')
        return axios.get(`http://localhost/deviceRepairs`,{
            params
        })
    }

    listNopage(params){
        return axios.get(`http://localhost/deviceRepairs/listNopage`,{
            params:params
        })
    }
    //修改
    update(params){
        return axios.put(`http://localhost/deviceRepairs`,params)
    }

    selectEnclosures(attachIds){
        return axios.get(`http://localhost/deviceRepairs/selectEnclosures/${attachIds}`)
    }
}